package es.andresimon.portfolio.web;

import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import es.andresimon.portfolio.domain.Picture;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

@RooWebScaffold(path = "pictures", formBackingObject = Picture.class)
@RequestMapping("/pictures")
@Controller
public class PictureController {    
	
	public static Picture getPictureByPictureId(Long id) {
		if (id == null) return null;
    	return Picture.findPicturesByPictureId(id).getSingleResult(); 
	}
}
